A ledger is commonly defined as an account book of entry in which transactions are recorded. Meanwhile, a distributed ledger is digital ledger that is replicated in whole, or in part, across multiple computing nodes. The distributed ledger may be secured through cryptographic properties, also referred to as a cryptographic distributed ledger (CDL). A CDL can have at least some of the following characteristics, irreversibility (e.g., once a transaction is recorded it cannot be reversed), accessibility (e.g., any party can access the CDL in whole or in part), chronological and time-stamped (e.g., all participating parties know when a transaction was added to the ledger and in what order it was added), consensus-based (a transaction is added only if it is approved, typically unanimously, by parties on the network), verifiability (all transactions can be cryptographically verified), and/or the like. One non-limiting example of a cryptographic distributed ledger is a blockchain.
A distributed ledger, such as a blockchain, typically stores a continuously growing list of records. Although, often used for financial transactions, a blockchain can store other data such as information related to goods and services (i.e., products, packages, status, etc.), digital currency, stock, equity, software models, proprietary data, and other information. A decentralized scheme provides authority and trust to a decentralized network and enables its nodes to continuously and sequentially record their transactions on a public or a private “block”, creating a unique “chain” referred to as a blockchain. Cryptography, via hash codes, is used to secure an authentication of a transaction source and removes a central intermediary. The distributed ledger is secured from tampering and revision due to its immutable properties. For example, each block may contain a timestamp and a link to a previous block. Blockchain can be used to hold, track, transfer and verify information. Blockchain peers within the blockchain network may trigger a transaction to the blockchain ledger through an endorsement and consensus protocol with one or more other blockchain nodes ensuring that one entity cannot change the blockchain ledger on their own.
Conventionally, blockchain peer nodes only append new data blocks to a blockchain ledger. That is, blockchain nodes typically add new data blocks only rather than modifying or otherwise tampering with previously stored and existing data blocks. One of the reasons for this is because of the immutable properties of the distributed ledger and the endorsement and consensus processes required before new data to be added to the distributed ledger. However, data blocks within a blockchain ledger may become corrupt over time for various reasons such as malicious attack, system failure, software errors, and the like. As such, what is needed is a mechanism for repairing unwanted blocks in a blockchain ledger.